<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/style.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/tool/jquery/date/date_input.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/tool/jquery/jqueryui/css/jquery.ui.all.css" />
	<script language="javascript" src="${pageContext.request.contextPath}/tool/jquery/jquery.min.js"></script>
	<script language="javascript" src="${pageContext.request.contextPath}/js/public.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/tool/jquery/date/jquery.date_input.js"></script>
	<script language="javascript" src="${pageContext.request.contextPath}/tool/jquery/jqueryui/jquery.ui.core.js"></script>
	<script language="javascript" src="${pageContext.request.contextPath}/tool/jquery/jqueryui/jquery.ui.widget.js"></script>
	<script language="javascript" src="${pageContext.request.contextPath}/tool/jquery/jqueryui/jquery.ui.position.js"></script>
	<script language="javascript" src="${pageContext.request.contextPath}/tool/jquery/jqueryui/jquery.ui.autocomplete.js"></script>
	<script type="text/javascript">
		var showRes = function() {
			alert($("#ghsid").val());
		}
		
		$(function(){
			//时间选择框
			$("#flowtime").date_input();
			//自动填写(供货商)
			$( "#ghsid_show" ).autocomplete({
				source: "${pageContext.request.contextPath}/admin/user/search_user_ghs.action",
				minLength: 1,
				select: function( event, ui ) {
					$("#ghsid").val(ui.item.id);
				}
			});
			//自动填写(原料)
			$( "#material_show" ).autocomplete({
				source: "${pageContext.request.contextPath}/admin/material/search_material.action",
				minLength: 1,
				select: function( event, ui ) {
					$("#materialid").val(ui.item.id);
				}
			});
			
		})
	</script>
</head>
<body>
 <div class="mainCon">
  <div class="mCon">
  <div class="mCon_tab">
   <ul>
   	<li><span class="mCon_1cuta">增加/修改 产品出入库记录</span></li>
   	<li><span class="mCon_1cuta"><a href="javascript:history.back(-1);">返回</a></span></li>
   </ul>
  </div>
  <form action="${pageContext.request.contextPath}/admin/storage/do_save_storage_product.action" method="post" onsubmit="return beforeSubmit();">
   <input type="hidden" name="id" value="${empty baseinfo ? 0 : baseinfo.id}" />
   <div class="inke_list">
   	<div class="left">
   	<div class="mCon_1t mCon_2t"><strong>产品：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<input type="text" name="product_show" id="product_show" value="${baseinfo.productName}" class="mCon_int" <c:if test="${!empty baseinfo && baseinfo.productid!=0}">disabled="disabled"</c:if> />
		<input type="hidden" name="productid" id="productid" value="${baseinfo.productid}" />
	</div>
   	</div>
   	<div class="left">
   	<div class="mCon_1t mCon_2t"><strong>出入类型：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
			<select name="flowtype" class="mCon_int">
				<option value="1" <c:if test="${baseinfo.flowtype==1}">selected="selected"</c:if>>入库</option>
				<option value="2" <c:if test="${baseinfo.flowtype==2}">selected="selected"</c:if>>出库</option>
			</select>
	</div>
   	</div>
   </div>
   
   <div class="inke_list">
   	<div class="left">
   	<div class="mCon_1t mCon_2t"><strong>时间：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<input type="text" name="flowtime" id="flowtime" readonly="readonly" value="<fmt:formatDate value="${baseinfo.flowtime}" pattern="yyyy-MM-dd"/>" class="mCon_int Wdate" />
	</div>
   	</div>
   	
   	<div class="left">
   	<div class="mCon_1t mCon_2t"><strong>数量：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<input type="text" name="flownum" id="flownum" value="${baseinfo.flownum}" class="mCon_int" />
	</div>
   	</div>
   	
   </div>
   
   <div class="inke_list">
   	<div class="left">
   	<div class="mCon_1t mCon_2t"><strong>是否购买：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<select name="buy" class="mCon_int">
			<option value="1" <c:if test="${baseinfo.buy==1}">selected="selected"</c:if>>购入</option>
			<option value="2" <c:if test="${baseinfo.buy==2}">selected="selected"</c:if>>非购入</option>
		</select>
	</div>
   	</div>
   	
   <div class="left">
   	<div class="mCon_1t mCon_2t"><strong>供货商:</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<input type="text" name="ghsid_show" id="ghsid_show" class="mCon_int su_auto_complate" value="${baseinfo.ghsname}" />
		<input type="hidden" name="ghsid" id="ghsid" value="${baseinfo.ghsid}" />
	</div>
   	</div>
   </div>
   
   <div class="inke_list">
   <div class="left">
   	<div class="mCon_1t mCon_2t"><strong>单价：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<input type="text" name="price" value="${baseinfo.price}" class="mCon_int" />
	</div>
   	</div>
   <div class="left">
   	<div class="mCon_1t mCon_2t"><strong>原料：</strong></div>
    <div class="mCon_con mCon_con2 su_edit_input_width">
		<input type="text" name="material_show" id="material_show" value="${baseinfo.mname}" class="mCon_int su_auto_complate" />
		<input type="hidden" name="materialid" id="materialid" value="${baseinfo.materialid}" />
	</div>
   	</div>
   </div>
   
   <div class="inke_list">
    <div class="mCon_1t mCon_2t"><strong>描述：</strong></div>
    <div class="mCon_con mCon_con2">
    	<textarea rows="6" cols="80" name="sdesc">${baseinfo.sdesc}</textarea>
    </div>
   </div>

  <div class="scxz">
      <input class="fx1" type="submit" value="保 存" />
      <input class="fx2" type="button" onclick="showRes();" value="保存并继续" />
      <input class="fx1" type="button" onclick="history.back(-1);" value="返 回" />
  </div>
  </form>
  <div class="clear"></div>
  </div>
  <div class="clear"></div>
 </div>
 <script type="text/javascript">
//表单验证
 var beforeSubmit = function(){
 	//alert("aa");return false;
 	return true;
 }
 </script>
</body>
</html>


